pca9545_sources = [
    'pca9545.cpp',
    'pca9545_abi.cpp',
    'interface/i_pca9545.cpp',
] + chip_interface_sources

pca9545_lib = shared_library(
    'Pca9545',
    pca9545_sources, 
    include_directories: [include_dirs, chip_inc, '..', '../..', '../../internal/', '../../internal/chip'],
    dependencies: [internal_dep, libmcpp_deps],
    name_prefix: 'lib',
    name_suffix: 'so',
    install: true,
    install_dir: drivers_install_dir,
)

pca9545_dep = declare_dependency(
    link_with: pca9545_lib,
    dependencies: [internal_dep, libmcpp_deps],
)

if build_tests and meson_build
  custom_target(
    'copy_libPca9545',
    output: 'copy_libPca9545',
    command: ['cp', pca9545_lib.full_path(), drivers_install_dir],
    depends: pca9545_lib,
    build_by_default: true,
  )
endif 